package main

import (
	"learn/crawler/engine"
	"learn/crawler/lagou/parser"
	"learn/crawler/persist"
	"learn/crawler/scheduler"
)

func main() {
	itemChan, err := itemsaver.ItemSaver()
	if err != nil {
		panic(err)
	}

	e := engine.Engine{
		Scheduler:   &scheduler.SimpleScheduler{},
		WorkerCount: 100,
		ItemChan:    itemChan,
	}

	e.Run(engine.Request{
		Url:        "https://www.lagou.com",
		ParserFunc: parser.ParseCategory,
	})

	//TODO fetch BOSS zhipin
}
